

import 'package:basic_common/common_exports.dart';
import 'package:basic_modle/dr_profile_data.dart';

class MemberDetailController extends GetxController {
  final doctorInfo = DoctorData().obs;
  final identityInfo = IdentityData().obs;
  final signCount=0.obs;//签约人数

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    String docNo = Get.arguments['memberNo'];
    signCount.value=Get.arguments['signCount'];
    getDrProfile(docNo);
  }

  /// 获取医生信息
  getDrProfile(String docNo) async {
    HttpData res = await ApiService().drProfile(data: {
      "scene": "get-by-doctorNo",
      "sceneDesc": "根据doctorNo查询医生",
      "searchKey": "Doctor-No",
      "searchValue": docNo
    });
    if (res.code == 1) {
      DrProfileData doctorData = DrProfileData.fromJson(res.data);
      doctorInfo.value = doctorData.doctor!;
      identityInfo.value = doctorData.identity!;
    }
  }
}
